<?php

namespace app\common\model;

use think\facade\Db;
use think\Model;

class Note extends Model
{
    //自动生成写入时间
    protected $autoWriteTimestamp = true;

    public function note($data)
    {
        return Db::table('note')
            ->alias('n')
            ->where([
                'user_type' => $data['user_type'],
                'user_id' =>$data['user_id'],
            ])
            ->field('n.*')
            ->paginate($data);
    }
}